/*********************************************************************
 *                                                                   *
 *  Js Css Minifier ( JsCssMin )                                     *
 *  Author: Igor Kanshyn                                             *
 *  Copyright (c) 2009, Igor Kanshyn. All rights reserved.           *
 *                                                                   *
 *  JsCssMin is released under the Apache Software License.          *
 *  See LICENSE.txt for more details.                                *
 *                                                                   *
 *********************************************************************/

package org.grenader.jscssmin;

import org.grenader.jscssmin.model.Resource;
import org.grenader.jscssmin.model.ResourceGroup;

import java.io.File;
import java.util.HashSet;
import java.util.Set;

/**
 * <p>Product: JsCssMin ( JavaScript and CSS Minifier )<br>
 * Author: Igor Kanshyn (grenader).
 * </p>
 * Date: Apr 26, 2009
 */
public class FileNotFoundJsCssProcessor extends JsCssProcessor {
    private Set<String> shouldNotBeFoundSet = new HashSet<String>();

    public FileNotFoundJsCssProcessor(Set<String> shouldNotBeFoundSet) {
        this.shouldNotBeFoundSet = shouldNotBeFoundSet;
    }

    public FileNotFoundJsCssProcessor(String fileNotBeFoundSet) {
        this.shouldNotBeFoundSet.add(fileNotBeFoundSet);
    }

    public void startGroup(ResourceGroup resourceGroup) {
    }

    public boolean processResource(Resource resource) {
        return !shouldNotBeFoundSet.contains(resource.getFileName());
    }

    public void processGroupsResource(Resource resource) {
    }

    public void commitGroup(ResourceGroup resourceGroup) {
    }

    public String readFileContent(File file) {
        return null;
    }

    public void writeResultsIntoFile(File file, String content) {

    }

    public void finishProcessing() {

    }
}